import java.lang.reflect.Array;
import java.util.Arrays;

public class Main {
    public static void main(String[] args) {
        int[] arr1={1,3,0,0};
        int[] arr2={2,4};
        for(int i=0; i<arr2.length; i++){
            arr1[2+i]=arr2[i];
        }
        Arrays.sort(arr1);
        System.out.println(Arrays.toString(arr1));
    }
}
